/*
 * Created by IntelliJ IDEA.
 * User: amrk
 * Date: 28/04/2005
 * Time: 23:07:02
 */
package com.talios.jira.idea.actions;

import com.talios.jira.browser.signals.JiraServerDetails;
import com.talios.jira.feeds.AbstractFeedBuilder;

public class FixedInIdeaBuildFeedBuilder extends AbstractFeedBuilder {

    private String build;
    private String name;

    public FixedInIdeaBuildFeedBuilder(String build, String buildName) {
        this.build = build;
        this.name = buildName;

        setServers(getServers());
    }

    public JiraServerDetails[] getServers() {
        JiraServerDetails[] jiraServerDetailses = new JiraServerDetails[]{
                new JiraServerDetails(
                        "http://jetbrains.net/jira",
                        "jirabrowser",
                        "G74Om4",
                        false,
                        false,
                        "")
        };

        return jiraServerDetailses;
    }

    public String buildRssFeedUrl(boolean includeUserDetails) {
        StringBuffer buf = getBaseBuffer(true);

        buf.append("&pid=10132&fixfor=");
        buf.append(build);

        String rssFeed = buf.toString();

        System.out.println(rssFeed);
        return rssFeed;
    }

    public String getSearchFor() {
        return "JetBrains JIRA Issues in version " + name;
    }

}